package com.atguigu.petstore.shop.controller;

import com.atguigu.petstore.common.result.Result;
import com.atguigu.petstore.shop.service.ShopProductService;
import com.atguigu.petstore.shop.vo.ProductPublishVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lfy
 * @Description
 * @create 2023-09-26 14:48
 */
@Tag(name = "商城商品维护")
@RequestMapping("/api/shop")
@RestController
public class ShopProductController {

    @Autowired
    ShopProductService productService;

    @Operation(summary = "发布商品")
    @PostMapping("/product")
    public Result addProduct(@RequestBody ProductPublishVo vo){

        productService.publishProduct(vo);



        return Result.ok();
    }


}
